﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true" CodeFile="CargarVines.aspx.cs" Inherits="CargarVines" %>

<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxLoadingPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
    <%@ Register Assembly="UsrControls" Namespace="UsrControls" TagPrefix="cc1" %>
<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">
        <tr>
            <td>
                            &nbsp;</td>
        </tr>
        <tr>
            <td>
            <cc1:msgbox ID="msgBox1" runat="server" />
                            <dx:ASPxButton ID="btnEliminar" runat="server" Text="ELIMINAR" 
                    Theme="iOS" onclick="btnEliminar_Click">
                            </dx:ASPxButton>
                <dx:ASPxGridView runat="server" ClientInstanceName="ASPxGridViewVines" 
                    KeyFieldName="AVI_ID" AutoGenerateColumns="False" Theme="PlasticBlue" 
                    ID="ASPxGridViewVines">
                    <Columns>
                        <dx:GridViewCommandColumn ShowSelectCheckbox="True" 
                            ShowInCustomizationForm="True" VisibleIndex="0">
                            <HeaderTemplate>
                    <dx:ASPxCheckBox ID="SelectAllCheckBox" runat="server" ToolTip="Seleccione/Deselecciones todas las filas de  la pagina"
                        ClientSideEvents-CheckedChanged="function(s, e) { ASPxGridViewVines.SelectAllRowsOnPage(s.GetChecked()); }" />
                </HeaderTemplate>
                <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn Caption="USUARIO_CARGA_EXCEL" FieldName="USU_NOMBRE" 
                            VisibleIndex="2">
                            <CellStyle BackColor="#0099CC">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ID" ReadOnly="True" 
                            ShowInCustomizationForm="True" VisibleIndex="1">
                            <EditFormSettings Visible="False">
                            </EditFormSettings>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_CLIENTE" 
                            ShowInCustomizationForm="True" VisibleIndex="4">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ORIGEN" 
                            ShowInCustomizationForm="True" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_DESTINO" 
                            ShowInCustomizationForm="True" VisibleIndex="6">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_CONCESIONARIO" 
                            ShowInCustomizationForm="True" VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_VIN" ShowInCustomizationForm="True" 
                            VisibleIndex="8">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_NoMOTOR" 
                            ShowInCustomizationForm="True" VisibleIndex="9">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_INVENTARIO" 
                            ShowInCustomizationForm="True" VisibleIndex="10">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_DESCRIPCION" 
                            ShowInCustomizationForm="True" VisibleIndex="11">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_COLOR" ShowInCustomizationForm="True" 
                            VisibleIndex="12">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ZONA" ShowInCustomizationForm="True" 
                            VisibleIndex="13">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_SOLICITANTE" 
                            ShowInCustomizationForm="True" VisibleIndex="14">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ALMACEN" 
                            ShowInCustomizationForm="True" VisibleIndex="15">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_TIPO_FACTURACION" 
                            ShowInCustomizationForm="True" VisibleIndex="16">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_NoEQUIPO" 
                            ShowInCustomizationForm="True" VisibleIndex="17">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ZVSK" ShowInCustomizationForm="True" 
                            VisibleIndex="18">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_KMAT" ShowInCustomizationForm="True" 
                            VisibleIndex="19">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_TIPO" ShowInCustomizationForm="True" 
                            VisibleIndex="20">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_TIPO_UNIDAD" 
                            ShowInCustomizationForm="True" VisibleIndex="21">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ANO_MDL" 
                            ShowInCustomizationForm="True" VisibleIndex="22">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_PEDIDO" 
                            ShowInCustomizationForm="True" VisibleIndex="23">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_ENTREGA" 
                            ShowInCustomizationForm="True" VisibleIndex="24">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_FACTURA" 
                            ShowInCustomizationForm="True" VisibleIndex="25">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_FCH_FACT" 
                            ShowInCustomizationForm="True" VisibleIndex="26">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_BL" ShowInCustomizationForm="True" 
                            VisibleIndex="27">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_FECHA_DESPACHO_DEALER" 
                            ShowInCustomizationForm="True" VisibleIndex="28">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_DESPACHO" 
                            ShowInCustomizationForm="True" VisibleIndex="29">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_FECHA_RECEPCION_DEALER" 
                            ShowInCustomizationForm="True" VisibleIndex="30">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_NOVEDADES_DESTINO" 
                            ShowInCustomizationForm="True" VisibleIndex="31">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_NOVEDADES_ORIGEN" 
                            ShowInCustomizationForm="True" VisibleIndex="32">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_REPORTE_FACTURA" 
                            ShowInCustomizationForm="True" VisibleIndex="33">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_COMENTARIOS" 
                            ShowInCustomizationForm="True" VisibleIndex="34">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_REPORTADO_EN_DESPACHO" 
                            ShowInCustomizationForm="True" VisibleIndex="35">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_FECHA_CARGUE" VisibleIndex="3" 
                            Caption="FECHA_CARGUE_EXCEL_USUARIO">
                         <CellStyle BackColor="#0099CC">
                                                    </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_PESO" VisibleIndex="36" 
                            Caption="PESO">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AVI_REPORTADO_EN_ENTREGA" 
                            ShowInCustomizationForm="True" VisibleIndex="37">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="VALOR" FieldName="AVI_VALOR" 
                            VisibleIndex="38">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="True" ShowGroupPanel="True" ShowFilterRowMenu="True">
                    </Settings>
                </dx:ASPxGridView>
            </td>
        </tr>
        <tr>
            <td>
               <asp:FileUpload runat="server" ID="fuImportar"></asp:FileUpload>
                <asp:Button ID="btnImportarVinesCarga" runat="server" 
                    onclick="btnImportarVinesCarga_Click" Text="Importar" />
                <asp:HyperLink runat="server" NavigateUrl="~/Archivos/PruebaAutosol.xls" 
                    ClientIDMode="Static" ID="HyperLink1">Descargar Plantilla</asp:HyperLink>
</td>
        </tr>
        <tr>
            <td>
                Listado de Vines no cargados en el sistema por que ya existian :
                <asp:Label ID="lblVinesYaCargados" runat="server"></asp:Label>
</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

